import 'package:built_collection/built_collection.dart';
import 'package:backend.core/core/domain/entities/api/google_play/api_google_play_purchased_item_acknowledgement_status.dart';
import 'package:equatable/equatable.dart';
import 'package:backend.core/core/domain/entities/api/google_play/api_google_play_purchased_item.dart';
import 'package:backend.core/core/domain/entities/api/google_play/api_google_play_purchased_subscription_cancellation_info.dart';
import 'package:backend.core/core/domain/entities/api/google_play/api_google_play_purchased_subscription_pause_info.dart';
import 'package:backend.core/core/domain/entities/api/google_play/api_google_play_purchased_subscription_price_change_status.dart';
import 'package:backend.core/core/domain/entities/api/google_play/api_google_play_purchased_subscription_status.dart';
import 'package:backend.core/core/domain/entities/api/google_play/api_google_play_purchased_subscription_transaction.dart';

class ApiGooglePlayPurchasedSubscription extends Equatable implements ApiGooglePlayPurchasedItem {
  const ApiGooglePlayPurchasedSubscription({
    required this.purchaseItemSku,
    required this.purchaseToken,
    required this.test,
    required this.startTime,
    required this.autoRenewalEnabled,
    required this.acknowledgementStatus,
    required this.status,
    required this.expirationTime,
    required this.priceChangeStatus,
    required this.cancellationInfo,
    required this.pauseInfo,
    required this.transactions,
  });

  final String purchaseItemSku;
  final String purchaseToken;
  final bool test;
  final DateTime startTime;
  final bool autoRenewalEnabled;
  final ApiGooglePlayPurchasedItemAcknowledgementStatus acknowledgementStatus;
  final ApiGooglePlayPurchasedSubscriptionStatus status;
  final DateTime? expirationTime;
  final ApiGooglePlayPurchasedSubscriptionPriceChangeStatus priceChangeStatus;
  final ApiGooglePlayPurchasedSubscriptionCancellationInfo? cancellationInfo;
  final ApiGooglePlayPurchasedSubscriptionPauseInfo? pauseInfo;
  final BuiltList<ApiGooglePlayPurchasedSubscriptionTransaction> transactions;

  @override
  List<Object?> get props {
    return [
      purchaseItemSku,
      purchaseToken,
      test,
      startTime,
      autoRenewalEnabled,
      acknowledgementStatus,
      status,
      expirationTime,
      priceChangeStatus,
      cancellationInfo,
      pauseInfo,
      transactions,
    ];
  }
}
